package com.elasticsearch.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * faq dto
 *
 * @author Amadeus
 * @date 2023/06/26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "scrm_faq")
public class FaqDTO {

    @Id
    private String id;

    @Field(type = FieldType.Integer)
    private Integer questionId;
    @Field(type = FieldType.Text)
    private String nickName;
    @Field(type = FieldType.Text)
    private String aid;

    @Field(type = FieldType.Text)
    private String title;
    @Field(type = FieldType.Text)
    private String content;
    @Field(type = FieldType.Text)
    private String answer;
    @Field(type = FieldType.Text)
    private String searchContent;


    @Field(type = FieldType.Integer)
    private Integer readCount;
    @Field(type = FieldType.Integer)
    private Integer collectCount;
    @Field(type = FieldType.Integer)
    private Integer answerCount;

    @Field(index = false, type = FieldType.Text)
    private String headUrl;

    @Field(index = false, type = FieldType.Text)
    private List<String> images;

    @Field(type = FieldType.Integer)
    private Integer isDeleted;


}
